<script setup>
import { RouterView } from 'vue-router';
</script>
<template>
  <!-- 左边导航栏 -->
  <el-container class="layout-container-demo" style="height: 500px">
    <el-aside width="200px">
      <el-scrollbar>
        <a href="/" class="index-a">
        <el-row class="tac">
          <el-col :span="12">
            <h5 class="mb-2">Default colors</h5>
          </el-col>
        </el-row>
      </a>
        <el-menu :default-openeds="['1']" router="true">
          <el-sub-menu index="1">
            <template #title>
              <el-icon><message /></el-icon>系统管理
            </template>
            <el-menu-item-group>
              <el-menu-item index="/system/userSys">用户管理</el-menu-item>
              <el-menu-item index="/system/roleSys">角色管理</el-menu-item>
              <el-menu-item index="/system/menuSys">菜单管理</el-menu-item>
              <el-menu-item index="/system/depSys">部门管理</el-menu-item>
              <el-menu-item index="/system/postSys">岗位管理</el-menu-item>
              <el-sub-menu index="1-6">
              <template #title>日志管理</template>
              <el-menu-item index="1-6-1">操作日志</el-menu-item>
              <el-menu-item index="1-6-2">登陆日志</el-menu-item>
            </el-sub-menu>
            </el-menu-item-group>
          </el-sub-menu>
        </el-menu>
      </el-scrollbar>
    </el-aside>
  
    <!-- 中间显示的内容 -->
    <el-main>
      <RouterView></RouterView>
    </el-main>
  </el-container>
</template>

<style scoped>
 .el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
    height: 98vh;
  }
  
  .el-main {
    background-color: #ffffff;
    color: #333;
    height: 98vh;
    font-size: 14px;
    padding: auto;
    padding-top: 0px;
    margin: 0px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }

  .titel{
    text-align: center;
    height: 100px
  }

  .tac{
    height: 50px;
    line-height: 10px;
  }

  .mb-2{
    text-align: center;
  }

.index-a{
  text-decoration: none;
  color: black
}
</style>
